package cn.school.test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class TEstArray {
    public static void main(String[] args) {
        List<Integer> list= new ArrayList<>(Arrays.asList(1,5,6,3,7,8,10,12));
        System.out.println(list);
        //删除其中的偶数
        for(int i=0;i<list.size();i++){
            if(list.get(i)%2==0)
                list.remove(i);
        }
        System.out.println("删除后：");
        System.out.println(list);
    }
}
